package com.dcivision.framework.taglib.channel;


import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


public abstract class AbstractAjaxProcessor {
 
 // because processor should be stateless,so this treat with thread safe
 protected static AjaxThreadContext threadContext = new AjaxThreadContext();
	  
 
  private static final Log log = LogFactory.getLog(AbstractAjaxProcessor.class);
  
  protected void initPageContext(ServletContext servletContext,ServletConfig servletConfig,HttpServletRequest request,HttpServletResponse response,HttpSession session) throws Exception{
    threadContext.getPageContext().setServletContext(servletContext);
    threadContext.getPageContext().setServletConfig(servletConfig);
    threadContext.getPageContext().setRequest(request);
    threadContext.getPageContext().setResponse(response);
    threadContext.getPageContext().setSession(session);
    threadContext.getConnnection();      
  }
  
 
  

}
